import request from '@/utils/request'
import { getToken } from '@/utils/auth'
import { param } from '@/utils/index'

// 获取表单记录
export function pagingShareForm(query) {
  return request({
    url: '/content/shareForm/paging',
    method: 'get',
    params: query
  })
}

// 获取表单 排行榜
export function pagingRankingList(query) {
  return request({
    url: '/content/shareForm/pagingRankingList',
    method: 'get',
    params: query
  })
}

// 获取表单 排行榜
export function pagingSubmit(query) {
  return request({
    url: '/content/shareForm/pagingSubmit',
    method: 'get',
    params: query
  })
}

// 获取提交记录表头
export function getTableHeader(contentId) {
  return request({
    url: '/content/shareForm/getTableHeader',
    method: 'get',
    params: { contentId }
  })
}

// 提交记录导出
export function exportBacth(query) {
  return process.env.BASE_API + '/content/shareForm/exportBacth?' + param(query) + '&accessToken=' + getToken()
}

// 排行版导出
export function exportBacthRanking(query) {
  return process.env.BASE_API + '/content/shareForm/exportBacthRanking?' + param(query) + '&accessToken=' + getToken()
}

// 分发记录导出
export function exportBacthShare(query) {
  return process.env.BASE_API + '/content/shareForm/exportBacthShare?' + param(query) + '&accessToken=' + getToken()
}
